Description | : **Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier). The Data Upload API allows the caller to upload data content to the Azure Maps service. You can use this API in a scenario like uploading a collection of Geofences in `GeoJSON` format, for use in our [Azure Maps Geofencing Service](/rest/api/maps/spatial). ## Submit Upload Request To upload your content you will use a `POST` request. The request body will contain the data to upload. The `Content-Type` header will be set to the content type of the data. For example, to upload a collection of geofences in `GeoJSON` format, set the request body to the geofence content. Set the `dataFormat` query parameter to _geojson_, and set the `Content-Type` header to either one of the following media types: - `application/json` if `dataFormat` is `JSON` - `application/vnd.geo+json` if `dataFormat` is `geoJSON` - `application/octet-stream` if `dataFormat` is `zip` Here's a sample request body for uploading a simple Geofence represented as a circle geometry using a center point and a radius. The sample below is in `GeoJSON`: ```json { "type": "FeatureCollection", "features": [{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [-122.126986, 47.639754] }, "properties": { "geometryId": "001", "radius": 500 } }] } ``` The Data Upload API performs a long-running operation. ## Data Upload Limits Please, be aware that currently every Azure Maps account has a [data storage limit](/azure/azure-resource-manager/management/azure-subscription-service-limits#azure-maps-limits). Once the storage limit is reached, all the new upload API calls will return a `409 Conflict` http error response. You can always use the [Data Delete API](/rest/api/maps/data/delete) to delete old/unused content and create space for new uploads. |
Reference | : Link ¶ |
⚼ Request
POST:
/mapData
{
x-ms-client-id:
string
,
subscription-key:
string
,
api-version:
string
,
description:
string
,
dataFormat:
string
,
UploadContent:
object
,
}
⚐ Response (200)
{
error:
}
{
,
code:
string
,
message:
string
,
details:
[
,
string
,
]
target:
string
,
}
⚐ Response (202)
{
operation-location:
string
,
}
⚐ Response (400)
{
error:
}
{
,
code:
string
,
message:
string
,
details:
[
,
string
,
]
target:
string
,
}
⚐ Response (401)
{
error:
}
{
,
code:
string
,
message:
string
,
details:
[
,
string
,
]
target:
string
,
}
⚐ Response (403)
{
error:
}
{
,
code:
string
,
message:
string
,
details:
[
,
string
,
]
target:
string
,
}
⚐ Response (404)
{
error:
}
{
,
code:
string
,
message:
string
,
details:
[
,
string
,
]
target:
string
,
}
⚐ Response (500)
{
error:
}
{
,
code:
string
,
message:
string
,
details:
[
,
string
,
]
target:
string
,
}